//购买弹出框
;(function(){
	var click = document.querySelectorAll('.clickBuy');
	var buyWin = document.querySelector('.showpay-mask');
	var showPay = document.querySelector('.showpay-area');
	var closePay = document.querySelector('.closepay');
	for(var i=0,j=click.length;i<j;i++){
		click[i].addEventListener('tap',clickBuy);
	}
	closePay.addEventListener('tap',clickBuy);
	function clickBuy(e){
		buyWin.style.display = buyWin.style.display == 'none' ? 'block' : 'none';
		setTimeout(function(){
			showPay.style.bottom = parseInt(showPay.style.bottom) < 0 ? 0 : -90 + 'vh';
		})
		
	}
})();